//////////////////////////////////////////////////////////////////////////////////
//
//	Join/Quit Messages
//		- Version 1.2
//		- 04.18.2008
//		- diamond-optic
//////////////////////////////////////////////////////////////////////////////////
//
// Information:
//
// - NO LONGER SUPPORTED
//
// - Replaces join & quit messages
//
// Changelog:
//
// - 05.13.2006 Version 1.0
//	Initial Release
//
// - 07.01.2006 Version 1.1
//	Removed #define <engine> (requires amxx 1.75 or higher)
//
// - 04.18.2007 Version 1.2
//	Fixed some array stuff
//	Fixed the join msg block
//	Cleaned up the code a little bit
//	Updated public cvar format
//
//////////////////////////////////////////////////////////////////////////////////

#include <amxmodx>

#define VERSION "1.2"
#define SVERSION "v1.2 - by diamond-optic (www.AvaMods.com)"

public plugin_init()
{
	register_plugin("Join/Quit Messages",VERSION,"diamond-optic")
	register_cvar("amx_joinquit_msg_stats",SVERSION,FCVAR_SERVER|FCVAR_SPONLY)
	
	register_message(get_user_msgid("TextMsg"),"block_message") 
}

public block_message()
{
	if(get_msg_argtype(2) == ARG_STRING)
		{
		new value[64]
		get_msg_arg_string(2,value,63)
         
		if((equali(value,"#Game_disconnected")) || (containi(value,"joined the game") != -1))
			return PLUGIN_HANDLED

	}
	
	return PLUGIN_CONTINUE
}  

public client_putinserver(id)
{
	new putin_name[32]
	get_user_name(id,putin_name,31)
	
	client_print(0,print_chat,"*  %s has joined the damn game...",putin_name)
}

public client_disconnect(id)
{
	new leave_name[32]
	get_user_name(id,leave_name,31)
	
	client_print(0,print_chat,"*  %s is gay and left the game...",leave_name)
}
